package cn.lzy.scope;

import cn.lzy.scope.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Author lzy
 * @Date 2023/11/27 16:26
 * @Version
 **/
public class XmlDemo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        User u1 = ctx.getBean(User.class);
        User u2 = ctx.getBean(User.class);
        System.out.println(u1 == u2);
    }
}
